package cn.com.nes.site.service.crm.order.bo;

import cn.com.nes.site.entity.bo.BaseBO;
import cn.com.nes.site.entity.em.crm.saleorder.SaleOrderPayModelEnum;
import cn.com.nes.site.entity.em.crm.saleorder.SaleOrderStatusEnum;
import cn.com.nes.site.entity.em.crm.saleorder.SaleOrderTypeEnum;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
public class SaleOrderBO extends BaseBO {

    /**
     * 新增订单
     */
    private boolean addOrder;

    /**
     * 保存来源：01-商务项目，02-施工项目
     */
    private String saveSource = "01";

    /**
     * Indicates whether the handling for Excel import is enabled or not.
     * When set to true, it signifies that the system should process an Excel import for this sale order.
     * Default is set to false.
     */
    private boolean handleForExcelImport = false;

    /**
     * 销售订单ID
     */
    private Long saleOrderId;

    /**
     * 销售订单状态
     */
    private SaleOrderStatusEnum saleOrderStatus;

    /**
     * 客户UUID
     */
    private String customerUuid;

    /**
     * 商机UUID
     */
    private String opportunityUuid;

    /**
     * 订单名称
     */
    private String saleOrderName;

    /**
     * 联系电话
     */
    private String phone;

    /**
     * 公司ID
     */
    private String companyId;

    /**
     * 安装地址
     */
    private String installAddress;

    /**
     * 预计安装时间
     */
    private Date estimatedInstallTime;

    /**
     * 订单类型，对应字典表param_type = 303
     */
    private SaleOrderTypeEnum orderType;

    /**
     * 订单状态，对应字典表param_type = 302
     */
    private SaleOrderStatusEnum status;

    /**
     * 支付方式，对应字典表param_type = 306
     */
    private SaleOrderPayModelEnum payModel;

    /**
     * 总价
     */
    private BigDecimal totalOffer;

    /**
     * 成交总价
     */
    private BigDecimal totalPrice;

    /**
     * 折扣，百分比
     */
    private Integer discount = 100;

    /**
     * 总成本价格
     */
    private BigDecimal totalCostPrice;

    /**
     * 产品成本价格
     */
    private BigDecimal goodsCostPrice;

    /**
     * 其他成本价格
     */
    private BigDecimal otherCostPrice = BigDecimal.ZERO;

    /**
     * 实际成交时间
     */
    private Date realTradingTime;

    /**
     * 是否提交
     */
    private Boolean commit;

    /**
     * 行政区划编码
     */
    private String areaCode;

    /**
     * 客户房屋ID
     */
    private String houseId;

    /**
     * 设备类型
     */
    private String equipmentType;

    /**
     * 系统单列表
     */
    private List<SaleMasterBO> saleMasters;

    /**
     * 商城订单id
     */
    private String mallOrderId;

    /**
     * 数据来源
     */
    private String dataSource;

    /**
     * 安装房屋id
     */
    private String installInfoId;

    // 业务参数

    /**
     * 关联的商务项目UUID
     */
    private String relateOpportunityUuid;

    /**
     * 需要校验的
     */
    private List<String> allowDeviceModles;

}
